package org.self.activitidemo.schedule;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @auther 木玉川/ybs_0921@163.com
 * @date 2020-03-06 9:13
 */
@Configuration
@EnableScheduling
public class SimpleScheduleTask {

    @Scheduled(cron="0/10 * * * * ?")
    private void task(){
        System.out.println("【定时任务】 每10秒执行一次2！");
    }
}
